\bigskip
\bigskip
{\magonebf 5.13 Miscellaneous}
\bigskip
{\bf 5.13.1 Some useful functions}
\bigskip

\cleartabs
\+$void$ complete\_graph($graph\&\ G,\ int\ n$) &\cr
\+                           &creates a complete graph $G$ with $n$ nodes.\cr
\+\cr
\+$void$ random\_graph($graph\&\ G,\ int\ n,\ int\ m$)\cr
\+                           &creates a random graph $G$ with $n$ nodes\cr
\+                           &and $m$ edges.\cr
\+\cr
\+$void$ test\_graph($graph\&\ G$)
                             &creates interactively a user defined graph $G$.\cr
\+\cr
\+$void$ test\_bigraph($graph\&\ G,\ nodelist\&\ A,\ nodelist\&\ B$)\cr
\+                           &creates interactively a user defined bipartite\cr
\+                           &graph $G$ with sides $A$ and $B$. All edges are\cr
\+                           &directed from $A$ to $B$.\cr
\+\cr
\+$bool$ compute\_correspondence($graph\&\ G,\ edge\_array(edge)\&\ reversal$)\cr
\+                           &computes for every edge $e = (v,w)$ in $G$ its\cr
\+                           &reversal $reversal[e] = (w,v)$ in $G$ ( nil if\cr
\+                           &not present). Returns true if every edge has a\cr
\+                           &reversal and false otherwise.\cr
\+\cr
\+$void$ eliminate\_parallel\_edges($graph\&\ G$)\cr
\+                           &removes all parallel edges from $G$.\cr
\+\cr
\+$void$ cmdline\_graph($graph\&\ G$,\ int\ argc,\ char**\ argv)\cr
\+              &builds graph $G$ as specified by the command line\cr
\+              &arguments:\cr
\+              &prog \hskip 2cm &$\longrightarrow$ test\_graph()\cr
\+              &prog $n$        &$\longrightarrow$ complete\_graph($n$)\cr
\+              &prog $n$ $m$    &$\longrightarrow$ test\_graph($n,m$)\cr
\+              &prog $file$     &$\longrightarrow$ $G$.read\_graph($file$)\cr

   
\vfill\eject

